package com.tensquare.eureka.qa.client;

import com.tensquare.eureka.qa.client.impl.BaseClientImpl;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
//fallback是如果此类出问题去找实现类
@FeignClient(value = "tensquare-base", fallback = BaseClientImpl.class)
public interface BaseClient {
    //要调用人家的某个接口，需要写完整路径，@PathVariable("labelId")必须和路径名一致
    @RequestMapping(value = "/label/{labelId}", method = RequestMethod.GET)
    public Result findById(@PathVariable("labelId") String labelId);
}
